//package com.web.controller;
//
//import com.alibaba.fastjson2.JSON;
//import com.web.entity.ResponseResult;
//import com.web.entity.Student;
//import com.web.service.StudentService;
//import jakarta.servlet.ServletException;
//import jakarta.servlet.annotation.WebServlet;
//import jakarta.servlet.http.HttpServlet;
//import jakarta.servlet.http.HttpServletRequest;
//import jakarta.servlet.http.HttpServletResponse;
//import org.springframework.web.bind.annotation.CrossOrigin;
//
//import javax.annotation.Resource;
//import java.io.IOException;
//import java.util.List;
//
//@CrossOrigin
//@WebServlet("/findStudents")
//public class FindStudentsServlet extends HttpServlet {
//
//    @Resource
//    private StudentService studentService;
//
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//
//        List<Student> allStudents = studentService.findAllStudents();
//        resp.getWriter().write(JSON.toJSONString(new ResponseResult()));
//    }
//}
